import request from '@/utils/request'

// 根据地区汇总销售额数据
export const regionCollect = params => request.get(`/api/order-service/report/regionCollect/${params.start}/${params.end}`)

// 获取销售额统计
export const amountCollect = params => request.get(`/api/order-service/report/amountCollect/${params.collectType}/${params.start}/${params.end}`)

// 获取销售前几的商品
export const skuTop = params => request.get(`/api/order-service/report/skuTop/${params.topValue}/${params.start}/${params.end}`)

// 获取一定时间范围之内的收入
export const orderAmount = params => request.get('/api/order-service/report/orderAmount', { params })

// 获取一定时间范围之内的订单总数
export const orderCount = params => request.get('/api/order-service/report/orderCount', { params })

// 获取售货机商品销量
export const skuCollect = (code, start, end) => request.get(`/api/order-service/report/skuCollect/${code}/${start}/${end}`)

// 订单搜索
export const orderSearch = params => request.get('/api/order-service/order/search', { params })

// 获取一定时间范围之内的分成总数
export const totalBill = params => request.get('/api/order-service/report/totalBill', { params })

// 获取一定日期范围之内的合作商分成汇总数据
export const partnerCollect = params => request.get('/api/order-service/report/partnerCollect', { params })
